﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using ECare.BUS;
using ECare.BUS.Data;

namespace ECare.Client.frms
{
    public partial class frmOutDatas : frmGridTemplate
    {
        public frmOutDatas()
        {
            InitializeComponent();


            this.Load += frmOutDatas_Load;
            this.grd.CellDoubleClick += grd_CellDoubleClick;
       
        }
        public BindingList<PlanOutInfo> source { get; set; }
        void grd_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            var entitye = this.grd.Rows[e.RowIndex].DataBoundItem as PlanOutInfo;
            var frm = new frmOutInfoReadOnly();
            frm.entity = entitye;
            frm.ShowDialog();

        }
        void frmOutDatas_Load(object sender, EventArgs e)
        {
            //throw new NotImplementedException();
            source = new BindingList<PlanOutInfo>(PlanHelper.GetPlanOuts(true));
            this.grd.DataSource = source;
        }
    }
}
